﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using NangLuongTieuDiemGUI.NangLuongTieuDiemUserControl;

namespace NangLuongTieuDiemGUI.NangLuongTieuDiemForms
{
    public partial class frmLocationSanPham : DevExpress.XtraEditors.XtraForm
    {
        public frmLocationSanPham()
        {
            InitializeComponent();
        }
        int n = 0;
        public frmLocationSanPham(int _K)
        {
            n = _K;
            InitializeComponent();
        }
        private void btnHuy_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            try { 
            //ghi nhận các đường dẫn.
                if (txtAcqui.Text.Trim() == string.Empty)
                {
                    ClassUtils.Utils.MassageBoxErrorOtInformation("Đường dẫn acquy không ", "", false);
                    return;
                }
                ucDanhSachSanPham.m_locationPin = txtAcqui.Text.Trim();
                this.Close();
            }
            catch { }
        }

        private void txtPin_EditValueChanged(object sender, EventArgs e)
        {
            try {
                SaveFileDialog save = new SaveFileDialog();
                save.Filter = "File Excel|*.xls";
                if (save.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    txtAcqui.Text = save.FileName;
                }
            }
            catch { }

        }
    }
}